<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
    <script src="../jquery-3.3.1.js"></script>
</head>
<body>
    <div class="container">
        <form action="#">
            <input class="input" type="text">
            <button class="bt"></button>
        </form>
    </div>
</body>
</html>
<script>
    $('.bt').click(function(){
        $('.input').toggleClass('inputToLong')
        $('.bt').toggleClass('btToX')
    })
</script>